<#include "../../select.ftl" />
<!-- Modal -->
<div class="modal-dialog wide" style="width: 1000px;">
    <div class="modal-content">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
            <h4 class="modal-title" id="myModalLabel">
            <#if ykTj??>
                <#if ykTj.id??>
                    编辑
                <#else>
                    新增
                </#if>
            </#if>
            </h4>
        </div>
        <div class="modal-body">
            <div id="errorMessage"><#include "../../message.ftl" /></div>
            <form class="form-horizontal" role="form" id="ykTjForm" method="post"
                  action="${absoluteContextPath}/yk/ykTj/save">
            <#if ykTj??>
                <#if ykTj.id??>
                    <input type="hidden" name="id" value="${ykTj.id?c}"/>
                <#else>
                    <input type="hidden" name="id" value=""/>
                </#if>
            </#if>
                <div class="row">

                    <div class="form-group col-md-4">
                        <label class="col-sm-4 control-label">预约号</label>

                        <div class="col-sm-8">
                            <input name="bookId" value="${ykTj.bookId!''}" type="text" class="form-control"/>
                        </div>
                    </div>
                    <div class="form-group col-md-4">
                        <label class="col-sm-4 control-label">卡号</label>

                        <div class="col-sm-8">
                            <input name="cardId" value="${ykTj.cardId!''}" type="text" class="form-control"/>
                        </div>
                    </div>
                    <div class="form-group col-md-4">
                        <label class="col-sm-4 control-label">客户姓名</label>

                        <div class="col-sm-8">
                            <input name="userName" value="${ykTj.userName!''}" type="text" class="form-control"/>
                        </div>
                    </div>
                    <div class="form-group col-md-4">
                        <label class="col-sm-4 control-label">性别</label>

                        <div class="col-sm-8">
                        <@select name="sex" value="${ykTj.sex!''}" list=sexTypeList class="form-control"/>
                        </div>
                    </div>
                    <div class="form-group col-md-4">
                        <label class="col-sm-4 control-label">年龄</label>

                        <div class="col-sm-8">
                            <input name="age" value="${ykTj.age!''}" type="text" class="form-control"/>
                        </div>
                    </div>
                    <div class="form-group col-md-4">
                        <label class="col-sm-4 control-label">手机</label>

                        <div class="col-sm-8">
                            <input name="phone" value="${ykTj.phone!''}" type="text" class="form-control"/>
                        </div>
                    </div>
                    <div class="form-group col-md-4">
                        <label class="col-sm-4 control-label">身份证</label>

                        <div class="col-sm-8">
                            <input name="identity" value="${ykTj.identity!''}" type="text" class="form-control"/>
                        </div>
                    </div>
                    <div class="form-group col-md-4">
                        <label class="col-sm-4 control-label">类型</label>

                        <div class="col-sm-8">
                        <@select name="akType" value="${ykTj.akType!''}" list=AKTypeList class="form-control"/>
                            <#--<input name="akType" value="${ykTj.akType!''}" type="text" class="form-control"/>-->
                        </div>
                    </div>
                    <div class="form-group col-md-4">
                        <label class="col-sm-4 control-label">下单日期</label>

                        <div class="col-sm-8">
                            <input name="billTime" value="${ykTj.billTime!''}" type="text" class="form-control"/>
                        </div>
                    </div>
                    <div class="form-group col-md-4">
                        <label class="col-sm-4 control-label">产品名称</label>

                        <div class="col-sm-8">
                            <input name="productName" value="${ykTj.productName!''}" type="text" class="form-control"/>
                        </div>
                    </div>
                    <div class="form-group col-md-4">
                        <label class="col-sm-4 control-label">渠道来源</label>

                        <div class="col-sm-8">
                        <@select name="channelType" value="${ykTj.channelType!''}" list=channelTypeList class="form-control"/>

                            <#--<input name="channelType" value="${ykTj.channelType!''}" type="text" class="form-control"/>-->
                        </div>
                    </div>
                    <div class="form-group col-md-4">
                        <label class="col-sm-4 control-label">体检金额</label>

                        <div class="col-sm-8">
                            <input name="tjMoney" value="${ykTj.tjMoney!''}" type="text" class="form-control"/>
                        </div>
                    </div>
                    <div class="form-group col-md-4">
                        <label class="col-sm-4 control-label">实收金额</label>

                        <div class="col-sm-8">
                            <input name="ssMoney" value="${ykTj.ssMoney!''}" type="text" class="form-control"/>
                        </div>
                    </div>
                    <div class="form-group col-md-4">
                        <label class="col-sm-4 control-label">来捡</label>

                        <div class="col-sm-8">
                            <input name="tjLj" value="${ykTj.tjLj!''}" type="text" class="form-control"/>
                        </div>
                    </div>
                    <div class="form-group col-md-4">
                        <label class="col-sm-4 control-label">带检</label>

                        <div class="col-sm-8">
                            <input name="tjDj" value="${ykTj.tjDj!''}" type="text" class="form-control"/>
                        </div>
                    </div>
                    <div class="form-group col-md-4">
                        <label class="col-sm-4 control-label">分管人员</label>

                        <div class="col-sm-8">
                            <input name="tjFg" value="${ykTj.tjFg!''}" type="text" class="form-control"/>
                        </div>
                    </div>
                    <div class="form-group col-md-4">
                        <label class="col-sm-4 control-label">收款方式</label>

                        <div class="col-sm-8">
                            <input name="payment" value="${ykTj.payment!''}" type="text" class="form-control"/>
                        </div>
                    </div>
                    <div class="form-group col-md-4">
                        <label class="col-sm-4 control-label">收款金额</label>

                        <div class="col-sm-8">
                            <input name="sprice" value="${ykTj.sprice!''}" type="text" class="form-control"/>
                        </div>
                    </div>
                    <div class="form-group col-md-4">
                        <label class="col-sm-4 control-label">是否贵宾</label>
                        <div class="col-sm-8">
                            <input name="spareA" value="${ykTj.spareA!''}" type="text" class="form-control"/>
                        </div>
                    </div>
                    <div class="form-group col-md-4">
                        <label class="col-sm-4 control-label">是否免体检生化A</label>
                        <div class="col-sm-8">
                            <input name="spareB" value="${ykTj.spareB!''}" type="text" class="form-control"/>
                        </div>
                    </div>
                <#-- <div class="form-group col-md-4">
                     <label class="col-sm-4 control-label">机构级次码</label>
                     <div class="col-sm-8">
                         <input name="orgLevelCode" value="${ykTj.orgLevelCode!''}" type="text" class="form-control"/>
                     </div>
                 </div>
                 <div class="form-group col-md-4">
                     <label class="col-sm-4 control-label">创建日期</label>
                     <div class="col-sm-8">
                         <input name="createTime" value="${ykTj.createTime!''}" type="text" class="form-control"/>
                     </div>
                 </div>
                 <div class="form-group col-md-4">
                     <label class="col-sm-4 control-label">创建人</label>
                     <div class="col-sm-8">
                         <input name="createName" value="${ykTj.createName!''}" type="text" class="form-control"/>
                     </div>
                 </div>
                 <div class="form-group col-md-4">
                     <label class="col-sm-4 control-label">成本</label>
                     <div class="col-sm-8">
                         <input name="cost" value="${ykTj.cost!''}" type="text" class="form-control"/>
                     </div>
                 </div>
                 <div class="form-group col-md-4">
                     <label class="col-sm-4 control-label"></label>
                     <div class="col-sm-8">
                         <input name="spareA" value="${ykTj.spareA!''}" type="text" class="form-control"/>
                     </div>
                 </div>
                 <div class="form-group col-md-4">
                     <label class="col-sm-4 control-label"></label>
                     <div class="col-sm-8">
                         <input name="spareB" value="${ykTj.spareB!''}" type="text" class="form-control"/>
                     </div>
                 </div>
                 <div class="form-group col-md-4">
                     <label class="col-sm-4 control-label"></label>
                     <div class="col-sm-8">
                         <input name="spareC" value="${ykTj.spareC!''}" type="text" class="form-control"/>
                     </div>
                 </div>
                 <div class="form-group col-md-4">
                     <label class="col-sm-4 control-label"></label>
                     <div class="col-sm-8">
                         <input name="spareD" value="${ykTj.spareD!''}" type="text" class="form-control"/>
                     </div>
                 </div>
                 <div class="form-group col-md-4">
                     <label class="col-sm-4 control-label"></label>
                     <div class="col-sm-8">
                         <input name="spareE" value="${ykTj.spareE!''}" type="text" class="form-control"/>
                     </div>
                 </div>-->
                </div>
            </form>
        </div>
        <div class="modal-footer">
            <button type="button" class="btn btn-default" data-dismiss="modal" aria-hidden="true">关闭</button>
            <button type="button" class="btn btn-primary" onclick="save();">保存</button>
        </div>
    </div>
</div>
<script>
    function save() {
        $("#" + "ykTjForm").ajaxSubmit({
            success: function (data) {
                data = JSON.parse(data);
                if (data.returnCode == 1) {
                    $('#myModal').modal("hide");
                    $.showMessage({parentId: "showMessage", message: "信息保存成功！", type: "success"});
                    refreshTable();
                } else {
                    $.showMessage({parentId: "errorMessage", message: "<strong>错误信息</strong>：" + data.returnMsg, type: "error"});
                }
            }
        });
    }
    $(function () {
        $("input[name=billTime]").focus(function () {
            WdatePicker({dateFmt: 'yyyy-MM-dd'});
        })
        $("div[class='tooltip fade top in']").hide();
    });
</script>